<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>个人中心</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css" />
      <link rel="stylesheet" type="text/css" href="../../css/common.css" />
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    	<link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
      <style>
          html, body {width: 100%;min-height: 100%;background:#F3EFEE;}
          .aui-active .aui-bar-tab-label{
            color: #f5a51c
          }
          .login {height:10rem;background-image: -webkit-linear-gradient(0deg, #f5c674, #ed824c);/*background-image: url(../../image/personal_bkg.jpg);background-repeat: no-repeat; background-size: cover;*/position: relative;}
      	  .login .personal_logo {width: 3rem;height: 3rem;border-radius: 50%;}
      		.login .userinfo .title {font-size: 0.8rem; color: #fff;}
      		/* 设置条目 */
      		.item {height: 3rem;line-height: 3rem;padding-left: 0.7rem;background-color: #fff;}
      		.item_ico {float: left;width: 2.3rem;padding: 0.7rem 0.7rem 0.7rem 0;}
      		.item_arrow {float: right;width: 1.5rem;padding: 1rem 0.7rem 1rem 0;}
      		.item span {font-size: 0.7rem;}
          [v-cloak] {
              display: none;
          }
          #header_top {
            background: #fff;
          }
          #header_top .aui-icon-left,
          #header_top .aui-title,
          #header_top .aui-icon-search,
          #header_top .aui-pull-right .aui-iconfont {
            color: #333;
          }

      </style>
  </head>
  <body>
<div id="app" >
  <header class="aui-bar aui-bar-nav" id="header_top">
    <a class="aui-pull-left aui-btn" onclick="goback()">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title">店铺积分</div>
    <a class="aui-pull-right aui-btn" onclick="goback()">
        规则
    </a>
  </header>

  <div class="aui-refresh-content">
    <div class="aui-content" >

     <div class="login"  tapmode="">
       <!-- <img src="../../image/personal_bkg.jpg" alt="" class="loginbg"> -->

       <div class="userinfo" >
         <div class="userHerder">

         </div>
         <div class="userContent" style="text-align:center;">
           <div style="font-size:1.5rem;color:#fff;">{{dataInfo.money | moneyFilter}}</div>
           <div style="font-size:0.7rem;color:#fff;">当前积分</div>
         </div>
       </div>

     </div>
   </div>
   <ul class="aui-list aui-media-list">
     <!-- <li class="aui-list-item aui-list-item-middle">
         <div class="aui-media-list-item-inner">
             <div class="aui-list-item-media" style="width:3rem">
                 <img src="../../image/my/m48.jpg" class="aui-img-round aui-list-img-sm" style="width: 2rem;height: 2rem;">
             </div>
             <div class="aui-list-item-inner aui-list-item-arrow">
                  提现
             </div>
         </div>
     </li>
     <li class="aui-list-item aui-list-item-middle">
         <div class="aui-media-list-item-inner">
             <div class="aui-list-item-media" style="width:3rem">
                 <img src="../../image/my/m49.jpg" class="aui-img-round aui-list-img-sm" style="width: 2rem;height: 2rem;">
             </div>
             <div class="aui-list-item-inner aui-list-item-arrow">
                换购历史
             </div>
         </div>
     </li> -->
     <li class="aui-list-item aui-list-item-middle" @click="to_tx()">
         <div class="aui-media-list-item-inner">
             <div class="aui-list-item-media" style="width:3rem">
                 <img src="../../image/my/m48.jpg" class="aui-img-round aui-list-img-sm" style="width: 2rem;height: 2rem;">
             </div>
             <div class="aui-list-item-inner aui-list-item-arrow">
                提现
             </div>
         </div>
     </li>
     <li class="aui-list-item aui-list-item-middle" @click="look_gz()">
         <div class="aui-media-list-item-inner">
             <div class="aui-list-item-media" style="width:3rem">
                 <img src="../../image/my/m58.png" class="aui-list-img-sm" style="width: 1.2rem;height: 1.2rem;margin-left: 0.5rem;">
             </div>
             <div class="aui-list-item-inner aui-list-item-arrow">
                提现规则
             </div>
         </div>
     </li>
    </ul>

  <div>
</div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/zepto.js"></script>
  <script type="text/javascript" src="../../script/vue.min.js"></script>
  <script type="text/javascript" src="../../script/utils.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript" src="../../script/aui-tab.js"></script>
  <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  <script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
  <script type="text/javascript">
  function goback(){
    api.closeWin();

  }
      apiready = function(){
        new Vue({
          el:'#app',
          data:{
              dataInfo:{},
              url:''
          },
          methods:{
            // 提现
            to_tx:function(){
              $api.setStorage('dp_tx_type', 2);

              api.openWin({
                  name: 'withdraw2_header',
                  url: './headerone.html',
                  pageParam: {
                        msg:'提现',
                        url:'./withdraw2.html'
                  }
              });
            },
            // 查看规则
            look_gz:function(){
              var $_this = this;
              api.openFrame({
                  name: 'dhgz_frm',
                  url: 'dhgz_frame.html',
                  rect: {
                      x: 0,
                      y: 0,
                      w: 'auto',
                      h: 'auto'
                  },
                  pageParam: {
                      url:$_this.url
                  },
                  bounces: false,
                  bgColor: 'rgba(0,0,0,0)'
              });
            },
            goback(){
                api.closeWin();
            },
            shopCenterMsg(){
               var _this = this;
               api.ajax({
                   url: window.Url.Freestore_balance,
                   method: 'post',

                   data: {
                       values: {
                           token:$api.getStorage('token'),
                           type:2
                       }

                   }
               },function(ret, err){
                   // alert( JSON.stringify( ret ) );
                   if (ret.re == 1) {
                      _this.dataInfo = ret.data;
                      _this.url = ret.data.url;
                   } else {
                       //console.log( JSON.stringify( ret ) );
                       var info = ret.info;
                       toast.loading({
                               title:ret.info,
                               duration:1000
                         },function(ret1){
                           //toast.hide();
                           //api.closeWin();

                           console.log(ret1)
                           setTimeout(function(){
                               toast.hide();
                               api.closeWin();
                           }, 1000)

                         });

                   }
               });

            }
          },
          mounted(){
            this.shopCenterMsg();

          },
          filters:{
            moneyFilter(value){
              if (value != undefined) return  Base64.decode(value).slice(3,-5)
            }
          }

        })
      };


      //刷新
      function setRefresh() {
          var pullRefresh = new auiPullToRefresh({
              container: document.querySelector('.aui-refresh-content'),
              triggerDistance: 100
          }, function(ret) {

              if (ret.status == "success") {
                  setTimeout(function() {
                      pullRefresh.cancelLoading(); //刷新成功后调用此方法隐藏
                  }, 1500)
              }
          })
      }

  </script>
  </html>
